package com.atguigu.daijia.driver.service;

import com.atguigu.daijia.model.form.map.CalculateDrivingLineForm;
import com.atguigu.daijia.model.form.order.OrderFeeForm;
import com.atguigu.daijia.model.form.order.StartDriveForm;
import com.atguigu.daijia.model.form.order.UpdateOrderCartForm;
import com.atguigu.daijia.model.vo.base.PageVo;
import com.atguigu.daijia.model.vo.map.DrivingLineVo;
import com.atguigu.daijia.model.vo.order.CurrentOrderInfoVo;
import com.atguigu.daijia.model.vo.order.NewOrderDataVo;
import com.atguigu.daijia.model.vo.order.OrderInfoVo;

import java.util.List;

/**
 * @author 谢忠涵7
 */
public interface OrderService {

    /**
     * 查询订单状态
     */
    Integer getOrderStatus(Long orderId);

    /**
     * @description: 查询司机新订单数据
     * @author: xiaoxie
     * @date: 2024/10/27 20:24
     * @param: [driverId] 司机id
     * @return: 订单数据列表
     **/
    List<NewOrderDataVo> findNewOrderQueueData(Long driverId);

    /**
     * @description: 司机抢单
     * @author: xiaoxie
     * @date: 2024/10/28 22:21
     * @param: [driverId, orderId]
     * @return: java.lang.Boolean
     **/
    Boolean robNewOrder(Long driverId, Long orderId);

    /**
     * @description: 司机端查找当前订单
     * @author: xiaoxie
     * @date: 2024/10/29 14:21
     * @param: [driverId] 司机id
     * @return: CurrentOrderInfoVo
     **/
    CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId);

    /**
     * @description: 获取订单账单详细信息
     * @author: xiaoxie
     * @date: 2024/10/29 14:30
     * @param: [orderId, driverId]
     * @return: OrderInfoVo
     **/
    OrderInfoVo getOrderInfo(Long orderId, Long driverId);

    /**
     * @description: 司机端计算最佳驾驶线路
     * @author: xiaoxie
     * @date: 2024/10/29 14:39
     * @param: [calculateDrivingLineForm] 位置信息
     * @return: DrivingLineVo
     **/
    DrivingLineVo calculateDrivingLine(CalculateDrivingLineForm calculateDrivingLineForm);

    /**
     * @description: 司机到达代驾起始地点更新订单信息
     * @author: xiaoxie
     * @date: 2024/10/29 15:18
     * @param: [orderId, driverId]
     * @return: java.lang.Boolean
     **/
    Boolean driverArriveStartLocation(Long orderId, Long driverId);

    /**
     * @description: 更新代驾车辆信息
     * @author: xiaoxie
     * @date: 2024/10/29 15:26
     * @param: [updateOrderCartForm]
     * @return: java.lang.Boolean
     **/
    Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm);

    /**
     * @description: 开启代驾服务 修改订单信息
     * @author: xiaoxie
     * @date: 2024/10/30 20:00
     * @param: [startDriveForm]
     * @return: java.lang.Boolean
     **/
    Boolean startDrive(StartDriveForm startDriveForm);
    /**
     * @description: 结束代驾服务更新订单账单
     * @author: xiaoxie
     * @date: 2024/10/30 22:07
     * @param: [orderFeeForm]
     * @return: java.lang.Boolean
     **/
    Boolean endDrive(OrderFeeForm orderFeeForm);

    /**
     * @description: 获取司机订单分页列表
     * @author: xiaoxie
     * @date: 2024/11/1 10:30
     * @param: [driverId, page, limit]
     * @return: PageVo
     **/
    PageVo findDriverOrderPage(Long driverId, Long page, Long limit);

    /**
     * 司机发送账单信息
     */
    Boolean sendOrderBillInfo(Long orderId, Long driverId);
}